package com.its.cloud.service;

import com.its.cloud.entity.ResultBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


/**
 * @author huguangjun
 * @className PaymentFeignService
 * @date 2021/1/10
 * @desc 14:52
 */
@Component
// feign自带负载均衡配置项，默认支持Ribbon
// 2.2.1版本默认超时等待1秒，高版本移除了超时等待，无需配置超时设置
@FeignClient(value = "PAYMENT-SERVICE",fallback = PaymentFeignServiceImpl.class)
public interface PaymentFeignService {

    @GetMapping(value = "/payment/get/{id}")
    ResultBean get(@PathVariable("id") Long id);

}
